<template>
  <div>
    <ul>
      <li>
        <!-- 类似router-link -->
        <router-link to="/">home</router-link>
      </li>
      <li><nuxt-link to="/about">about</nuxt-link></li>
      <li><nuxt-link to="/users">user</nuxt-link></li>

      <div>
        <button @click="goHome">Home</button>
      </div>
    </ul>
    <!-- 子页面出口 -->
    <nuxt />
  </div>
</template>

<script>
export default {
  methods: {
    goHome() {
      this.$router.push("/");
    },
  },
};
</script>

<style>
</style>